//
//  UpdateController.h
//  D&D Manager
//
//  Created by Matthew Hutton on 26/07/2007.
//  Copyright 2007 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "CharacterClassController.h"

/*!
 * Contains methods for updating files to work with different versions from which they were created.
 */
@interface UpdateController : NSObject {
	IBOutlet NSWindow *mainUpdateWindowOnePointFour;
	IBOutlet NSButton *continueWithBackupButton;
	IBOutlet NSButton *continueWithoutBackupButton;
	NSWindow *mainScreen;
	NSManagedObjectContext *mObjC;
	NSManagedObjectModel *model;
	NSManagedObject *battleStore;
	NSArrayController *characterController;
	BOOL needsCustomCharToDisplay;
}
-(id)initWithBattleStore:(NSManagedObject *)bs
 withCharacterController:(NSArrayController *)cc
		  withMainWindow:(NSWindow *)window;
-(IBAction)cancelUpdate:(id)sender;
-(IBAction)continueWithBackup:(id)sender;
-(IBAction)continueWithoutBackup:(id)sender;
/*!
* Processes actions required to update files to work with version 1.4 from version 1.3.9
 */
-(void)versionOnePointFourBasicProcessing;
/*!
* Processes actions required to update files to work with version 1.2 from version 1.0 or later.
 */
-(void)preVersionOnePointTwoStuff;
/*!
* Processes actions required to update files to work with version 1.3 from version 1.2 or later.
 */
-(void)preVersionOnePointThreeStuff;
/*!
* Processes actions required to update files to work with version 1.3.9 from version 1.3 or later.
 */
-(void)preVersionOnePointFourStuff;
/*!
 * Checks the battleStore object stored in this controller for its version for which relevent update methods (if any) need to be run.
 */
-(void)runUpdates;
@end
